3.9.19 \(\int (c (d \sin (e+f x))^p)^n (a+a \sin (e+f x))^m \, dx\) [819]

Optimal. Leaf size=113 \[ -\frac {2^{\frac {1}{2}+m} F_1\left (\frac {1}{2};-n p,\frac {1}{2}-m;\frac {3}{2};1-\sin (e+f x),\frac {1}{2} (1-\sin (e+f x))\right ) \cos (e+f x) \sin ^{-n p}(e+f x) \left (c (d \sin (e+f x))^p\right )^n (1+\sin (e+f x))^{-\frac {1}{2}-m} (a+a \sin (e+f x))^m}{f} \]

[Out]

-2^(1/2+m)*AppellF1(1/2,-n*p,1/2-m,3/2,1-sin(f*x+e),1/2-1/2*sin(f*x+e))*cos(f*x+e)*(c*(d*sin(f*x+e))^p)^n*(1+s
in(f*x+e))^(-1/2-m)*(a+a*sin(f*x+e))^m/f/(sin(f*x+e)^(n*p))

________________________________________________________________________________________

Rubi [A]
time = 0.16, antiderivative size = 113, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 5, integrand size = 27, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.185, Rules used = {2905, 2866, 2865, 2864, 138} \begin {gather*} -\frac {2^{m+\frac {1}{2}} \cos (e+f x) (\sin (e+f x)+1)^{-m-\frac {1}{2}} (a \sin (e+f x)+a)^m \sin ^{-n p}(e+f x) F_1\left (\frac {1}{2};-n p,\frac {1}{2}-m;\frac {3}{2};1-\sin (e+f x),\frac {1}{2} (1-\sin (e+f x))\right ) \left (c (d \sin (e+f x))^p\right )^n}{f} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(c*(d*Sin[e + f*x])^p)^n*(a + a*Sin[e + f*x])^m,x]

[Out]

-((2^(1/2 + m)*AppellF1[1/2, -(n*p), 1/2 - m, 3/2, 1 - Sin[e + f*x], (1 - Sin[e + f*x])/2]*Cos[e + f*x]*(c*(d*
Sin[e + f*x])^p)^n*(1 + Sin[e + f*x])^(-1/2 - m)*(a + a*Sin[e + f*x])^m)/(f*Sin[e + f*x]^(n*p)))

Rule 138

Int[((b_.)*(x_))^(m_)*((c_) + (d_.)*(x_))^(n_)*((e_) + (f_.)*(x_))^(p_), x_Symbol] :> Simp[c^n*e^p*((b*x)^(m +
 1)/(b*(m + 1)))*AppellF1[m + 1, -n, -p, m + 2, (-d)*(x/c), (-f)*(x/e)], x] /; FreeQ[{b, c, d, e, f, m, n, p},
 x] &&  !IntegerQ[m] &&  !IntegerQ[n] && GtQ[c, 0] && (IntegerQ[p] || GtQ[e, 0])

Rule 2864

Int[((d_.)*sin[(e_.) + (f_.)*(x_)])^(n_)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_), x_Symbol] :> Dist[(-b)*(
d/b)^n*(Cos[e + f*x]/(f*Sqrt[a + b*Sin[e + f*x]]*Sqrt[a - b*Sin[e + f*x]])), Subst[Int[(a - x)^n*((2*a - x)^(m
 - 1/2)/Sqrt[x]), x], x, a - b*Sin[e + f*x]], x] /; FreeQ[{a, b, d, e, f, m, n}, x] && EqQ[a^2 - b^2, 0] &&  !
IntegerQ[m] && GtQ[a, 0] && GtQ[d/b, 0]

Rule 2865

Int[((d_.)*sin[(e_.) + (f_.)*(x_)])^(n_.)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_), x_Symbol] :> Dist[(d/b)
^IntPart[n]*((d*Sin[e + f*x])^FracPart[n]/(b*Sin[e + f*x])^FracPart[n]), Int[(a + b*Sin[e + f*x])^m*(b*Sin[e +
 f*x])^n, x], x] /; FreeQ[{a, b, d, e, f, m, n}, x] && EqQ[a^2 - b^2, 0] &&  !IntegerQ[m] && GtQ[a, 0] &&  !Gt
Q[d/b, 0]

Rule 2866

Int[((d_.)*sin[(e_.) + (f_.)*(x_)])^(n_.)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_), x_Symbol] :> Dist[a^Int
Part[m]*((a + b*Sin[e + f*x])^FracPart[m]/(1 + (b/a)*Sin[e + f*x])^FracPart[m]), Int[(1 + (b/a)*Sin[e + f*x])^
m*(d*Sin[e + f*x])^n, x], x] /; FreeQ[{a, b, d, e, f, m, n}, x] && EqQ[a^2 - b^2, 0] &&  !IntegerQ[m] &&  !GtQ
[a, 0]

Rule 2905

Int[((c_.)*((d_.)*sin[(e_.) + (f_.)*(x_)])^(p_))^(n_)*((a_.) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.), x_Symbol]
 :> Dist[c^IntPart[n]*((c*(d*Sin[e + f*x])^p)^FracPart[n]/(d*Sin[e + f*x])^(p*FracPart[n])), Int[(a + b*Sin[e
+ f*x])^m*(d*Sin[e + f*x])^(n*p), x], x] /; FreeQ[{a, b, c, d, e, f, m, n, p}, x] &&  !IntegerQ[n]

Rubi steps

\begin {align*} \int \left (c (d \sin (e+f x))^p\right )^n (a+a \sin (e+f x))^m \, dx &=\left ((d \sin (e+f x))^{-n p} \left (c (d \sin (e+f x))^p\right )^n\right ) \int (d \sin (e+f x))^{n p} (a+a \sin (e+f x))^m \, dx\\ &=\left ((d \sin (e+f x))^{-n p} \left (c (d \sin (e+f x))^p\right )^n (1+\sin (e+f x))^{-m} (a+a \sin (e+f x))^m\right ) \int (d \sin (e+f x))^{n p} (1+\sin (e+f x))^m \, dx\\ &=\left (\sin ^{-n p}(e+f x) \left (c (d \sin (e+f x))^p\right )^n (1+\sin (e+f x))^{-m} (a+a \sin (e+f x))^m\right ) \int \sin ^{n p}(e+f x) (1+\sin (e+f x))^m \, dx\\ &=-\frac {\left (\cos (e+f x) \sin ^{-n p}(e+f x) \left (c (d \sin (e+f x))^p\right )^n (1+\sin (e+f x))^{-\frac {1}{2}-m} (a+a \sin (e+f x))^m\right ) \text {Subst}\left (\int \frac {(1-x)^{n p} (2-x)^{-\frac {1}{2}+m}}{\sqrt {x}} \, dx,x,1-\sin (e+f x)\right )}{f \sqrt {1-\sin (e+f x)}}\\ &=-\frac {2^{\frac {1}{2}+m} F_1\left (\frac {1}{2};-n p,\frac {1}{2}-m;\frac {3}{2};1-\sin (e+f x),\frac {1}{2} (1-\sin (e+f x))\right ) \cos (e+f x) \sin ^{-n p}(e+f x) \left (c (d \sin (e+f x))^p\right )^n (1+\sin (e+f x))^{-\frac {1}{2}-m} (a+a \sin (e+f x))^m}{f}\\ \end {align*}

________________________________________________________________________________________

Mathematica [B] Leaf count is larger than twice the leaf count of optimal. \(2967\) vs. \(2(113)=226\).
time = 14.00, size = 2967, normalized size = 26.26 \begin {gather*} \text {Result too large to show} \end {gather*}

Warning: Unable to verify antiderivative.

[In]

Integrate[(c*(d*Sin[e + f*x])^p)^n*(a + a*Sin[e + f*x])^m,x]

[Out]

(-3*AppellF1[1/2, -(n*p), 1 + m + n*p, 3/2, Tan[(-e + Pi/2 - f*x)/2]^2, -Tan[(-e + Pi/2 - f*x)/2]^2]*Cos[e + f
*x]*Sin[e + f*x]^(n*p)*(c*(d*Sin[e + f*x])^p)^n*(a + a*Sin[e + f*x])^m)/(f*(Sec[(-e + Pi/2 - f*x)/2]^2)^m*(3*A
ppellF1[1/2, -(n*p), 1 + m + n*p, 3/2, Tan[(-e + Pi/2 - f*x)/2]^2, -Tan[(-e + Pi/2 - f*x)/2]^2] - 2*((1 + m +
n*p)*AppellF1[3/2, -(n*p), 2 + m + n*p, 5/2, Tan[(-e + Pi/2 - f*x)/2]^2, -Tan[(-e + Pi/2 - f*x)/2]^2] + n*p*Ap
pellF1[3/2, 1 - n*p, 1 + m + n*p, 5/2, Tan[(-e + Pi/2 - f*x)/2]^2, -Tan[(-e + Pi/2 - f*x)/2]^2])*Tan[(-e + Pi/
2 - f*x)/2]^2)*((-3*n*p*AppellF1[1/2, -(n*p), 1 + m + n*p, 3/2, Tan[(-e + Pi/2 - f*x)/2]^2, -Tan[(-e + Pi/2 -
f*x)/2]^2]*Cos[e + f*x]^2*Sin[e + f*x]^(-1 + n*p))/((Sec[(-e + Pi/2 - f*x)/2]^2)^m*(3*AppellF1[1/2, -(n*p), 1
+ m + n*p, 3/2, Tan[(-e + Pi/2 - f*x)/2]^2, -Tan[(-e + Pi/2 - f*x)/2]^2] - 2*((1 + m + n*p)*AppellF1[3/2, -(n*
p), 2 + m + n*p, 5/2, Tan[(-e + Pi/2 - f*x)/2]^2, -Tan[(-e + Pi/2 - f*x)/2]^2] + n*p*AppellF1[3/2, 1 - n*p, 1
+ m + n*p, 5/2, Tan[(-e + Pi/2 - f*x)/2]^2, -Tan[(-e + Pi/2 - f*x)/2]^2])*Tan[(-e + Pi/2 - f*x)/2]^2)) + (3*Ap
pellF1[1/2, -(n*p), 1 + m + n*p, 3/2, Tan[(-e + Pi/2 - f*x)/2]^2, -Tan[(-e + Pi/2 - f*x)/2]^2]*Sin[e + f*x]^(1
 + n*p))/((Sec[(-e + Pi/2 - f*x)/2]^2)^m*(3*AppellF1[1/2, -(n*p), 1 + m + n*p, 3/2, Tan[(-e + Pi/2 - f*x)/2]^2
, -Tan[(-e + Pi/2 - f*x)/2]^2] - 2*((1 + m + n*p)*AppellF1[3/2, -(n*p), 2 + m + n*p, 5/2, Tan[(-e + Pi/2 - f*x
)/2]^2, -Tan[(-e + Pi/2 - f*x)/2]^2] + n*p*AppellF1[3/2, 1 - n*p, 1 + m + n*p, 5/2, Tan[(-e + Pi/2 - f*x)/2]^2
, -Tan[(-e + Pi/2 - f*x)/2]^2])*Tan[(-e + Pi/2 - f*x)/2]^2)) - (3*m*AppellF1[1/2, -(n*p), 1 + m + n*p, 3/2, Ta
n[(-e + Pi/2 - f*x)/2]^2, -Tan[(-e + Pi/2 - f*x)/2]^2]*Cos[e + f*x]*Sin[e + f*x]^(n*p)*Tan[(-e + Pi/2 - f*x)/2
])/((Sec[(-e + Pi/2 - f*x)/2]^2)^m*(3*AppellF1[1/2, -(n*p), 1 + m + n*p, 3/2, Tan[(-e + Pi/2 - f*x)/2]^2, -Tan
[(-e + Pi/2 - f*x)/2]^2] - 2*((1 + m + n*p)*AppellF1[3/2, -(n*p), 2 + m + n*p, 5/2, Tan[(-e + Pi/2 - f*x)/2]^2
, -Tan[(-e + Pi/2 - f*x)/2]^2] + n*p*AppellF1[3/2, 1 - n*p, 1 + m + n*p, 5/2, Tan[(-e + Pi/2 - f*x)/2]^2, -Tan
[(-e + Pi/2 - f*x)/2]^2])*Tan[(-e + Pi/2 - f*x)/2]^2)) + (3*Cos[e + f*x]*Sin[e + f*x]^(n*p)*(-1/3*((1 + m + n*
p)*AppellF1[3/2, -(n*p), 2 + m + n*p, 5/2, Tan[(-e + Pi/2 - f*x)/2]^2, -Tan[(-e + Pi/2 - f*x)/2]^2]*Sec[(-e +
Pi/2 - f*x)/2]^2*Tan[(-e + Pi/2 - f*x)/2]) - (n*p*AppellF1[3/2, 1 - n*p, 1 + m + n*p, 5/2, Tan[(-e + Pi/2 - f*
x)/2]^2, -Tan[(-e + Pi/2 - f*x)/2]^2]*Sec[(-e + Pi/2 - f*x)/2]^2*Tan[(-e + Pi/2 - f*x)/2])/3))/((Sec[(-e + Pi/
2 - f*x)/2]^2)^m*(3*AppellF1[1/2, -(n*p), 1 + m + n*p, 3/2, Tan[(-e + Pi/2 - f*x)/2]^2, -Tan[(-e + Pi/2 - f*x)
/2]^2] - 2*((1 + m + n*p)*AppellF1[3/2, -(n*p), 2 + m + n*p, 5/2, Tan[(-e + Pi/2 - f*x)/2]^2, -Tan[(-e + Pi/2
- f*x)/2]^2] + n*p*AppellF1[3/2, 1 - n*p, 1 + m + n*p, 5/2, Tan[(-e + Pi/2 - f*x)/2]^2, -Tan[(-e + Pi/2 - f*x)
/2]^2])*Tan[(-e + Pi/2 - f*x)/2]^2)) - (3*AppellF1[1/2, -(n*p), 1 + m + n*p, 3/2, Tan[(-e + Pi/2 - f*x)/2]^2,
-Tan[(-e + Pi/2 - f*x)/2]^2]*Cos[e + f*x]*Sin[e + f*x]^(n*p)*(-2*((1 + m + n*p)*AppellF1[3/2, -(n*p), 2 + m +
n*p, 5/2, Tan[(-e + Pi/2 - f*x)/2]^2, -Tan[(-e + Pi/2 - f*x)/2]^2] + n*p*AppellF1[3/2, 1 - n*p, 1 + m + n*p, 5
/2, Tan[(-e + Pi/2 - f*x)/2]^2, -Tan[(-e + Pi/2 - f*x)/2]^2])*Sec[(-e + Pi/2 - f*x)/2]^2*Tan[(-e + Pi/2 - f*x)
/2] + 3*(-1/3*((1 + m + n*p)*AppellF1[3/2, -(n*p), 2 + m + n*p, 5/2, Tan[(-e + Pi/2 - f*x)/2]^2, -Tan[(-e + Pi
/2 - f*x)/2]^2]*Sec[(-e + Pi/2 - f*x)/2]^2*Tan[(-e + Pi/2 - f*x)/2]) - (n*p*AppellF1[3/2, 1 - n*p, 1 + m + n*p
, 5/2, Tan[(-e + Pi/2 - f*x)/2]^2, -Tan[(-e + Pi/2 - f*x)/2]^2]*Sec[(-e + Pi/2 - f*x)/2]^2*Tan[(-e + Pi/2 - f*
x)/2])/3) - 2*Tan[(-e + Pi/2 - f*x)/2]^2*((1 + m + n*p)*((-3*(2 + m + n*p)*AppellF1[5/2, -(n*p), 3 + m + n*p,
7/2, Tan[(-e + Pi/2 - f*x)/2]^2, -Tan[(-e + Pi/2 - f*x)/2]^2]*Sec[(-e + Pi/2 - f*x)/2]^2*Tan[(-e + Pi/2 - f*x)
/2])/5 - (3*n*p*AppellF1[5/2, 1 - n*p, 2 + m + n*p, 7/2, Tan[(-e + Pi/2 - f*x)/2]^2, -Tan[(-e + Pi/2 - f*x)/2]
^2]*Sec[(-e + Pi/2 - f*x)/2]^2*Tan[(-e + Pi/2 - f*x)/2])/5) + n*p*((-3*(1 + m + n*p)*AppellF1[5/2, 1 - n*p, 2
+ m + n*p, 7/2, Tan[(-e + Pi/2 - f*x)/2]^2, -Tan[(-e + Pi/2 - f*x)/2]^2]*Sec[(-e + Pi/2 - f*x)/2]^2*Tan[(-e +
Pi/2 - f*x)/2])/5 + (3*(1 - n*p)*AppellF1[5/2, 2 - n*p, 1 + m + n*p, 7/2, Tan[(-e + Pi/2 - f*x)/2]^2, -Tan[(-e
 + Pi/2 - f*x)/2]^2]*Sec[(-e + Pi/2 - f*x)/2]^2*Tan[(-e + Pi/2 - f*x)/2])/5))))/((Sec[(-e + Pi/2 - f*x)/2]^2)^
m*(3*AppellF1[1/2, -(n*p), 1 + m + n*p, 3/2, Tan[(-e + Pi/2 - f*x)/2]^2, -Tan[(-e + Pi/2 - f*x)/2]^2] - 2*((1
+ m + n*p)*AppellF1[3/2, -(n*p), 2 + m + n*p, 5/2, Tan[(-e + Pi/2 - f*x)/2]^2, -Tan[(-e + Pi/2 - f*x)/2]^2] +
n*p*AppellF1[3/2, 1 - n*p, 1 + m + n*p, 5/2, Tan[(-e + Pi/2 - f*x)/2]^2, -Tan[(-e + Pi/2 - f*x)/2]^2])*Tan[(-e
 + Pi/2 - f*x)/2]^2)^2)))

________________________________________________________________________________________

Maple [F]
time = 0.12, size = 0, normalized size = 0.00 \[\int \left (c \left (d \sin \left (f x +e \right )\right )^{p}\right )^{n} \left (a +a \sin \left (f x +e \right )\right )^{m}\, dx\]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((c*(d*sin(f*x+e))^p)^n*(a+a*sin(f*x+e))^m,x)

[Out]

int((c*(d*sin(f*x+e))^p)^n*(a+a*sin(f*x+e))^m,x)

________________________________________________________________________________________

Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((c*(d*sin(f*x+e))^p)^n*(a+a*sin(f*x+e))^m,x, algorithm="maxima")

[Out]

integrate(((d*sin(f*x + e))^p*c)^n*(a*sin(f*x + e) + a)^m, x)

________________________________________________________________________________________

Fricas [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((c*(d*sin(f*x+e))^p)^n*(a+a*sin(f*x+e))^m,x, algorithm="fricas")

[Out]

integral(((d*sin(f*x + e))^p*c)^n*(a*sin(f*x + e) + a)^m, x)

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \left (a \left (\sin {\left (e + f x \right )} + 1\right )\right )^{m} \left (c \left (d \sin {\left (e + f x \right )}\right )^{p}\right )^{n}\, dx \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((c*(d*sin(f*x+e))**p)**n*(a+a*sin(f*x+e))**m,x)

[Out]

Integral((a*(sin(e + f*x) + 1))**m*(c*(d*sin(e + f*x))**p)**n, x)

________________________________________________________________________________________

Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((c*(d*sin(f*x+e))^p)^n*(a+a*sin(f*x+e))^m,x, algorithm="giac")

[Out]

integrate(((d*sin(f*x + e))^p*c)^n*(a*sin(f*x + e) + a)^m, x)

________________________________________________________________________________________

Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int {\left (c\,{\left (d\,\sin \left (e+f\,x\right )\right )}^p\right )}^n\,{\left (a+a\,\sin \left (e+f\,x\right )\right )}^m \,d x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((c*(d*sin(e + f*x))^p)^n*(a + a*sin(e + f*x))^m,x)

[Out]

int((c*(d*sin(e + f*x))^p)^n*(a + a*sin(e + f*x))^m, x)

________________________________________________________________________________________